Dynomotion

Group: DynoMotion Message: 10557 From: cnc_machines Date: 11/25/2014
Subject: Spindle Start
Greetings,

I am trying to get my spindle to start using the KStep. The strange thing is I can go into the digital IO and force output 0 on by clicking the box next to it with my mouse. When I do this my spindle starts running. However when I try to run the C program to do this it will not turn on.

#include "KMotionDef.h"

// assume KStep Relay Output #0 is CW and Relay Output #1 is CCW

main()
{
    SetBit(0);
    ClearBit(1);
}

Any idea what I am missing here? Seem like if I can turn it on and off in the digital IO this should also work.

Thanks,

Scott
Group: DynoMotion Message: 10558 From: Tom Kerekes Date: 11/25/2014
Subject: Re: Spindle Start
Hi Scott,

Are you configuring IO 0 and 1 to be outputs with SetBitDirection(0,1); and SetBitDirection(1,1); ??

Which checkboxes on the Digital IO Screen are you clicking and which checkboxes are selected?  There is one column to determine if the IO is an Output and one column of checkboxes to determine if the State is on or off.  This is described in the Help here in the topic Relay Driver Outputs:


HTH
Regards
TK


Group: DynoMotion Message: 10559 From: cnc_machines Date: 11/25/2014
Subject: Re: Spindle Start
Tom,

I may have wired something incorrectly. When I click on the box next to output 0 the spindle comes on - see the image below. Did I do something wrong?


Group: DynoMotion Message: 10560 From: Tom Kerekes Date: 11/25/2014
Subject: Re: Spindle Start
Hi Scott,

It still isn't clear what boxes you are selecting and whether they are checked or not.

Normally you would need to check the output box and the state box for the relay driver to turn on.

What parts of the previous email did you understand?

Regards
TK

Group: DynoMotion Message: 10563 From: cnc_machines Date: 11/25/2014
Subject: Re: Spindle Start
Tom,

I am clicking on the two boxes that are circled(output and state for encoder 0), and when I do so the spindle turns on.

Basically I am trying to get my spindle to turn on with the M3 in KMotionCNC. I believe I verified that it is wired correctly because I can force it on by checking the two boxes above.

The program that I pasted into my first post was the sample program in the KMotionCNC folder for the KStep. My assumption was that this is the proper way to turn on the spindle.

Group: DynoMotion Message: 10565 From: Jack Gizienski Date: 11/25/2014
Subject: Re: Spindle Start

Scott,

I just went through the same thing.  There are 2 things you need to do.  Go back and reread Tom’s email that talks about Setting your bits as outputs.  When you power up the Kflop configures those bits as inputs so you have to reconfigure them.

 

The second thing is in KflopCNC click on Tool setup and M3-M9.  Next to M3 click the drop down and select I /O Bit.  Enter the appropriate bit number near Set Bit and enter the appropriate state (1 or 0), probably 1 to turn the router on.

 

See if that helps,

Jack

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Tuesday, November 25, 2014 11:04 PM
To: DynoMotion@yahoogroups.com
Subject: [DynoMotion] Re: Spindle Start

 

 

Tom,

I am clicking on the two boxes that are circled(output and state for encoder 0), and when I do so the spindle turns on.

Basically I am trying to get my spindle to turn on with the M3 in KMotionCNC. I believe I verified that it is wired correctly because I can force it on by checking the two boxes above.

The program that I pasted into my first post was the sample program in the KMotionCNC folder for the KStep. My assumption was that this is the proper way to turn on the spindle.


This doesnt seem to be working. Rather than running the program in a thread, should I just set bit "0" to "1" for M3? I Then off (M5) by setting bit "0" back to "0"?

Once I get it turning on and off I am hoping to set the RPM using what you described in a previous post (right now I have the spindle speed set internally on the controller). However I cant even turn it on yet, much less calibrate the speed.

Thanks again for the help - I am still quite the novice here.

Scott

Group: DynoMotion Message: 10649 From: cnc_machines Date: 12/5/2014
Subject: Re: Spindle Start
Thanks everyone! it is working now. Obvious oversight on my part.